﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;

public partial class codelist : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
        
    }


    protected string Getcount()
    {
        string str = ConfigurationManager.ConnectionStrings["DevMgmntConnectionString"].ConnectionString.ToString();
        SqlConnection con = new SqlConnection(str);
        con.Open();
        str = "select iStaff_ID from t_record ";
        SqlDataAdapter da = new SqlDataAdapter(str, con);
        DataSet ds = new DataSet();
        int count = da.Fill(ds, "table");
        return count.ToString();
    }

    //删除

    protected void gv_infostatistic_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {

        string sqlstr = "delete from t_admin where iAdmin_ID='" + gv_infostatistic.DataKeys[e.RowIndex].Value.ToString() + "'";

        string str = ConfigurationManager.ConnectionStrings["DevMgmntConnectionString"].ConnectionString.ToString();
        SqlConnection cn33 = new SqlConnection(str);
        cn33.Open();
        SqlCommand sqlcom = new SqlCommand(sqlstr, cn33);

        sqlcom.ExecuteNonQuery();

        cn33.Close();

        gv_infostatistic.DataBind();

    }


}